@import "src/app/scss/breakpoints";
@import '~@angular/material/theming';

app-home {
  header {
    width: 100%;
    height: 96px;
    background: rgba(0, 0, 0, 0.2);

    .input-wrapper {
      width: 100%;
      max-width: 480px;
      border-radius: 28px;
      overflow: hidden;
      background: #fff;
      @include mat-elevation(1);

      &.paste {
        transition: width 0.4s;
        width: 210px;

        &.focused {
          position: absolute;
          left: 0;
          z-index: 9;
          width: calc(100% - 32px);
          max-width: 100%;
          margin: 0 16px;
        }
      }

      .input {
        width: 100%;
        height: 48px;
        line-height: 48px;
        padding: 0 18px;

        mat-icon {
          color: rgba(0,0,0,.87);
        }

        .clear-search {
          cursor: pointer;
        }

        input {
          width: 100%;
          height: 48px;
          min-height: 48px;
          max-height: 48px;
          padding: 0 16px;
          border: none;
          outline: none;
        }
      }
    }

    mat-icon {
      &.white {
        color: white;
      }
    }
  }

  .entries {
    margin-top: 20px;
    padding: 16px;
    overflow: auto;
    max-height: calc(768px - 96px - 16px);

    .entry {
      position: relative;
      flex: 1;
      background: rgba(0, 0, 0, 0.3);
      background-repeat: no-repeat !important;
      background-size: cover !important;
      min-width: 220px;
      max-width: 500px;
      height: 250px;
      margin-bottom: 10px;
      border-radius: 8px;

      &.lastOfRow {
        margin-right: 0px !important;
      }

      &.onHover, &.playing, &.downloading {
        .fg {
          display: flex;
          width: 100%;
          height: 100%;
          position: absolute;
          z-index: 999;
          background: rgba(0,0,0,0.6);
          top: 0;
          left: 0;
          color: #fff;
          border-radius: 8px;
        }
      }

      &.playing {
        .play {
          display: none;
        }
      }

      &:not(.playing) {
        .stop {
          display: none;
        }
      }

      .bg {
        background-repeat: no-repeat !important;
        background-size: cover !important;
        width: 100%;
        height: 100%;
        border-radius: 8px;
      }

      .title {
        position: absolute;
        bottom: 0;
        border-bottom-left-radius: 8px;
        border-bottom-right-radius: 8px;
        text-align: center;
        color: #fff;
        background: rgba(0,0,0,0.5);
        padding: 6px 12px;
        display: flex;
        align-items: center;
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
        min-height: 52px;
      }

      .fg {
        display: none;

        .wrapper {
          width: 100%;
          display: flex;
          align-items: center !important;
          justify-content: space-between !important;
          padding: 0 16px;

          .play, .stop {
            font-size: 75px;
            height: 75px;
            line-height: 75px;
            width: 75px;
          }

          .progress-container {
            display: flex;
            flex-direction: column-reverse;
            align-items: center;
            flex: 1;
            font-weight: bold;

            .spinner-container {
              position: relative;
              margin-bottom: 1em;

              .mat-progress-spinner {
                margin: 0 auto;
                circle {
                  stroke: #fff;
                }
              }

              span {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
              }
            }
          }
        }
      }
    }
  }
}
